<template>
    <base-dialog  v-bind="$attrs" v-on="$listeners" :title="title" size="tiny" @submit="toAdd" :no-button="disabled">
        <el-form  ref="elForm" label-width="80px" :model="formData" :rules="rules" :disabled="disabled">
            <el-form-item label="名字" prop="name">
                <el-input v-model="formData.name"></el-input>
            </el-form-item>
            <el-form-item label="排序">
                <el-input-number v-model="formData.no_order"></el-input-number>
            </el-form-item>
        </el-form>
    </base-dialog>
</template>
<script>

    import BaseDialog from "@/components/Common/BaseDialog";
    import DetailDialog from "@/mixins/DetailDialog";
    import XEUtils from "xe-utils";
    export default {
        name:"GroupDialog",
        mixins:[DetailDialog],
        data(){
            return {
                formData:{
                    name:'',
                    no_order:0
                },
                rules:{
                    name: [
                        { required: true,
                            message: '请输入名字',
                            trigger: 'blur'},

                    ],
                },
                rolelist:[],
                apiUrl:"addressBook/group"
            }
        },
        created() {
        },
        components: { BaseDialog},
        computed:{
            title() {
                return this.formData.id&&this.disabled?"查看":this.formData.id?"编辑":"新增群组"
            },
        },
        methods:{

        }
    }
</script>
